# -*- coding: utf-8 -*-
# @Time : 2022-06-24 9:35
# @Author : Z
# @Function : 移动端-订单管理
from Keywords.inter_keys import Inter

inter = Inter()

inter.set_url('')

# 登陆

# 获取订单列表
# current     size     keyWord    cookDeviceId  startTime    endTime      storeId非空  tableId   orderType   typeId
# 当前页码Int  数量Int   搜索关键词s  制作设备L      搜索开始时间s  搜索结束时间s  门店ID s	   餐桌ID s  订单状态Int   订单类型Int
inter.post_json('/maintain/order/chinese-food/page',
                '{"current":1,"size":15,"storeId":11,"tableId":11,"keyWord":"A301"，"cookDeviceId":1，"startTime":"2020-11-01 11:11:11","endTime":"2020-11-01 12:11:11","orderType":1,"typeId":1}')

# 订单详情
# orderId   订单ID L 非空
inter.post_json('/maintain/order/chinese-food/detail', '{"orderId":1}')

# 订单操作
# orderId非空  orderDetailIdList非空   remark  type非空
# 订单Id L     订单详情ID组 List        备注 s   操作类型 Integer 非空 1：退菜退单 ;2：重做菜品 ；3：强制完成;
# 退菜退单
inter.post_json('/maintain/order/chinese-food/update',
                '{"type":1,"orderId":1,"remark":"","orderDetailIdList":[1111,22222]}')
# 重做菜品
inter.post_json('/maintain/order/chinese-food/update',
                '{"type":2,"orderId":1,"remark":"","orderDetailIdList":[1111,22222]}')
# 强制完成
inter.post_json('/maintain/order/chinese-food/update',
                '{"type":3,"orderId":1,"remark":"","orderDetailIdList":[1111,22222]}')

# 餐桌列表
# storeId 门店ID s 非空
inter.post_json('/maintain/order/chinese-food/store-table/list','{"storeId":"1409687251966676993"}')

